//
//  PicModel.m
//  Connotation
//
//  Created by LZXuan on 15-4-7.
//  Copyright (c) 2015年 LZXuan. All rights reserved.
//

#import "PicModel.h"

@implementation PicModel
- (void)dealloc {
    //MRC 内存管理
    self.wid = nil;
    //更新时间
    self.update_time = nil;
    //字符串内容
    self.wbody = nil;
    //评论
    self.comments = nil;
    //点赞
    self.likes = nil;
    //图片的宽
    self.wpic_m_width = nil;
    //图片的高
    self.wpic_m_height = nil;
    //图片是否是 gif
    self.is_gif = nil;
    //中等图片的地址
    self.wpic_middle = nil;
    //大图片的地址
    self.wpic_large = nil;
    [super dealloc];
}
/**
 *  归档
 */
-(void)encodeWithCoder:(NSCoder *)aCoder
{
    [aCoder encodeObject:self.wid forKey:@"wid"];
    [aCoder encodeObject:self.update_time forKey:@"update_time"];
    [aCoder encodeObject:self.wbody forKey:@"wbody"];
    [aCoder encodeObject:self.comments forKey:@"comments"];
    [aCoder encodeObject:self.likes forKey:@"likes"];
    [aCoder encodeObject:self.wpic_m_width forKey:@"wpic_m_width"];
    [aCoder encodeObject:self.wpic_m_height forKey:@"wpic_m_height"];
    [aCoder encodeObject:self.is_gif forKey:@"is_gif"];
    [aCoder encodeObject:self.wpic_middle forKey:@"wpic_middle"];
    [aCoder encodeObject:self.wpic_large forKey:@"wpic_large"];
}
/**
 *  解档
 */
-(id)initWithCoder:(NSCoder *)aCoder
{
    if (self = [super init])
    {
        self.wid = [aCoder decodeObjectForKey:@"wid"];
        self.update_time = [aCoder decodeObjectForKey:@"update_time"];
        self.wbody = [aCoder decodeObjectForKey:@"wbody"];
        self.comments = [aCoder decodeObjectForKey:@"comments"];
        self.likes = [aCoder decodeObjectForKey:@"likes"];
        self.wpic_m_width = [aCoder decodeObjectForKey:@"wpic_m_width"];
        self.wpic_m_height = [aCoder decodeObjectForKey:@"wpic_m_height"];
        self.is_gif = [aCoder decodeObjectForKey:@"is_gif"];
        self.wpic_middle = [aCoder decodeObjectForKey:@"wpic_middle"];
        self.wpic_large = [aCoder decodeObjectForKey:@"wpic_large"];
    }
    
    return self;
}

@end
